import { reactive } from 'vue';

export const formConfigs = {
  configs: [
    {
      type: 'input',
      label: '创建人',
      key: 'category',
    },
    { type: 'datePicker', label: '创建时间', key: 'create' },
    {
      type: 'select',
      label: '产品类型',
      key: 'productType',
    },
    {
      type: 'select',
      label: '产品类型',
      key: 'productType',
    },
    {
      type: 'select',
      label: '产品类型',
      key: 'productType',
    },
    {
      type: 'select',
      label: '产品类型',
      key: 'productType',
    },
    {
      type: 'select',
      label: '产品类型',
      key: 'productType',
    },
    {
      type: 'select',
      label: '产品类型',
      key: 'productType',
    },
    {
      type: 'select',
      label: '产品类型',
      key: 'productType',
    },
  ],
  labelWidth: 70,
};

export const tabs = [
  {
    label: '未完成',
    value: 0,
  },
  {
    label: '已完成',
    value: 1,
  },
  {
    label: '已导出',
    value: 3,
  },
];

export const acBtnList = reactive([
  {
    label: '查看',
    type: 'text',
  },
  {
    label: '编辑',
    type: 'text',
  },
]);

export const columns = [
  {
    title: '序号',
    type: 'selection',
    width: 60,
  },
  {
    title: '序号',
    type: 'index',
    width: 60,
  },
  {
    title: '姓名',
    key: 'name',
    width: 100,
  },
  {
    title: '年龄',
    key: 'age',
    type: 'amount',
    width: 150,
  },
  {
    title: '地址',
    key: 'address',
    width: 250,
  },
  {
    title: '文件',
    slot: 'file',
    width: 150,
  },
  {
    title: '业务保证金（即占用金额）',
    align: 'center',
    children: [
      {
        title: '业务保证金总额',
        type: 'amount',
        align: 'center',
        key: 'businessTotalAmount',
        width: 120,
      },
      {
        title: '已用金额',
        align: 'center',
        children: [
          {
            title: '抵扣金额',
            type: 'amount',
            align: 'center',
            key: 'businessTotalDeductedAmount',
            width: 90,
          },
          {
            title: '动用金额',
            type: 'amount',
            align: 'center',
            key: 'businessTotalUsedAmount',
            width: 90,
          },
        ],
      },
      {
        title: '可用金额',
        type: 'amount',
        align: 'center',
        key: 'businessTotalAvailableAmount',
        width: 90,
      },
      { title: '业务保证金操作', align: 'center', slot: 'bussinessOperation', width: 140 },
    ],
  },
  {
    title: '地址',
    key: 'address',
    width: 250,
  },
  {
    title: '年龄',
    key: 'age',
    width: 150,
  },
  {
    title: '操作',
    slot: 'action',
    width: 150,
    fixed: 'right',
  },
];

export const pagination = reactive({
  current: 1,
  total: 0,
  pageSize: 10,
});
